home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / OXK8FU (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  1.3 KB  |  28 lines

  1. package com.sun.java.swing.plaf.metal;
  2.  
  3. import com.sun.java.swing.JLabel;
  4. import com.sun.java.swing.JList;
  5. import com.sun.java.swing.plaf.basic.BasicListCellRenderer;
  6. import com.sun.java.swing.preview.filechooser.FileFilter;
  7. import java.awt.Component;
  8.  
  9. public class MetalFileChooserUI$FilterComboBoxRenderer extends BasicListCellRenderer {
  10.    // $FF: synthetic field
  11.    MetalFileChooserUI this$0;
  12.  
  13.    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
  14.       super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
  15.       FileFilter filter = (FileFilter)value;
  16.       if (filter != null) {
  17.          ((JLabel)this).setText(filter.getDescription());
  18.       }
  19.  
  20.       return this;
  21.    }
  22.  
  23.    // $FF: synthetic method
  24.    public MetalFileChooserUI$FilterComboBoxRenderer(MetalFileChooserUI this$0) {
  25.       this.this$0 = this$0;
  26.    }
  27. }
  28.